package com.gxks.mall_manager.service.impl;

import com.gxks.commons.entity.Manager;
import com.gxks.mall_manager.dao.ManagerDao;
import com.gxks.mall_manager.service.ManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ManagerServiceImpl implements ManagerService {

    @Autowired
    private ManagerDao managerDao;

    @Override
    public List<Manager> selectAll(Map<String, Object> search) {
        return managerDao.selectAll(search);
    }

    @Override
    public int deleteById(Long id) {
        return managerDao.deleteById(id);
    }

    @Override
    public int resetState(Long StateId) {
        return managerDao.resetState(StateId);
    }

    @Override
    public int addSave(Manager manager) {
        return managerDao.addSave(manager);
    }

    @Override
    public Manager selectById(Long id) {
        return managerDao.selectById(id);
    }

    @Override
    public int editSave(Manager manager) {
        return managerDao.update(manager);
    }

    @Override
    public int deleteSome(Long[] managerId) {
        return managerDao.deleteSome(managerId);
    }

    @Override
    public int editState(Long[] managerId, Integer state) {
        return managerDao.editState(managerId,state);
    }
}
